<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- <p :style="{backgroundColor: bgc, color: color}">我是p标签</p> -->

        <!-- es6，对象的属性名和属性值如果名字一样，可以简写 -->
        <p :style="{backgroundColor: bgc, color}">我是p标签</p>
    </div>

    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                bgc: 'red',
                color: 'green'
            }
        })
    </script>
</body>
</html>